home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Macro assembler dev syst.adf / include / intuition / intuition.i next >
Text File  |  1985-12-20  |  48KB  |  1,268 lines

  1.  
  2.    IFND  INTUITION_INTUITION_I
  3. INTUITION_INTUITION_I   SET   1
  4.  
  5. ;** intuition.i *************************************************************
  6. ;*  Commodore-Amiga, Inc.
  7. ;*
  8. ;*  intuition.i main include file for assembly-language programmers
  9. ;*
  10. ;*          Modification History
  11. ;*      date    :   author :    Comments
  12. ;*     ------       ------      -------------------------------------
  13. ;*     1-30-85     -=RJ=-  created this file!
  14. ;*     6-12-85      Dale and Carl translated this from the c version
  15. ;*     6-13-85      =VoodooDrRj= added back the comments
  16. ;*
  17. ;****************************************************************************/
  18.  
  19.    IFND  GRAPHICS_GFX_I
  20.    include  'graphics/gfx.i'
  21.    ENDC
  22.  
  23.    IFND  GRAPHICS_CLIP_I
  24.    include  'graphics/clip.i'
  25.    ENDC
  26.  
  27.    IFND  GRAPHICS_VIEW_I
  28.    include  'graphics/view.i'
  29.    ENDC
  30.  
  31.    IFND  GRAPHICS_RASTPORT_I
  32.    include  'graphics/rastport.i'
  33.    ENDC
  34.  
  35.    IFND  GRAPHICS_LAYERS_I
  36.    include  'graphics/layers.i'
  37.    ENDC
  38.  
  39.    IFND  GRAPHICS_TEXT_I
  40.    include 'graphics/text.i'
  41.    ENDC
  42.  
  43.    IFND EXEC_PORTS_I
  44.    include 'exec/ports.i'
  45.    ENDC
  46.  
  47.    IFND  DEVICES_TIMER_I
  48.    include  'devices/timer.i'
  49.    ENDC
  50.  
  51.    IFND  DEVICES_INPUTEVENT_I
  52.    include 'devices/inputevent.i'
  53.    ENDC
  54.  
  55.  
  56. ; ========================================================================;
  57. ; === Menu ===============================================================;
  58. ; ========================================================================;
  59.  STRUCTURE Menu,0
  60.  
  61.     APTR  mu_NextMenu   ; menu pointer, same level
  62.     WORD mu_LeftEdge    ; dimensions of the select box;
  63.     WORD mu_TopEdge  ; dimensions of the select box;
  64.     WORD mu_Width ; dimensions of the select box;
  65.     WORD mu_Height   ; dimensions of the select box;
  66.     WORD mu_Flags ; see flag definitions below;
  67.     APTR mu_MenuName ; text for this Menu header
  68.     APTR  mu_FirstItem  ; pointer to first in chain;
  69.  
  70.     ; these mysteriously-named variables are for internal use only
  71.     WORD mu_JazzX
  72.     WORD mu_JazzY
  73.     WORD mu_BeatX
  74.     WORD mu_BeatY
  75.  
  76.     LABEL mu_SIZEOF
  77.  
  78. ; FLAGS SET BY BOTH THE APPLIPROG AND INTUITION
  79. MENUENABLED equ $0001   ; whether or not this menu is enabled;
  80.  
  81. ; FLAGS SET BY INTUITION;
  82. MIDRAWN equ $0100 ; this menu's items are currently drawn;
  83.  
  84.  
  85.  
  86.  
  87.  
  88. ; ========================================================================;
  89. ; === MenuItem ===========================================================;
  90. ; ========================================================================;
  91.  STRUCTURE MenuItem,0
  92.  
  93.     APTR mi_NextItem ; pointer to next in chained list
  94.     WORD mi_LeftEdge ; dimensions of the select box
  95.     WORD mi_TopEdge  ; dimensions of the select box
  96.     WORD mi_Width ; dimensions of the select box
  97.     WORD mi_Height   ; dimensions of the select box
  98.     WORD mi_Flags ; see the defines below
  99.  
  100.     LONG mi_MutualExclude ; set bits mean this item excludes that item
  101.  
  102.     APTR mi_ItemFill ; points to Image, IntuiText, or NULL
  103.  
  104.     ; when this item is pointed to by the cursor and the items highlight
  105.     ; mode HIGHIMAGE is selected, this alternate image will be displayed
  106.     APTR mi_SelectFill  ; points to Image, IntuiText, or NULL
  107.  
  108.     BYTE mi_Command  ; only if appliprog sets the COMMSEQ flag
  109.  
  110.     ; The following variable is strictly from Kludge-City, where some people
  111.     ; still live.  It is included solely because our types.i macros aren't
  112.     ; smart enough to do the right thing, which would be the automatic 
  113.     ; word-alignment to these references as it SHOULD be in order to duplicate
  114.     ; the way alignments are adjusted in the c-language.  And instead of 
  115.     ; correcting the problem, I am obliged to kludge up my include.i files.
  116.     ; So here it is!
  117.     BYTE mi_KludgeFill00 ; defined as a BYTE because this does
  118.  
  119.     APTR mi_SubItem  ; if non-zero, DrawMenu shows "->"
  120.  
  121.    ; The NextSelect field represents the menu number of next selected 
  122.    ; item (when user has drag-selected several items)
  123.     WORD mi_NextSelect
  124.  
  125.     LABEL  mi_SIZEOF
  126.  
  127. ; --- FLAGS SET BY THE APPLIPROG --------------------------------------------
  128. CHECKIT     equ $0001   ; whether to check this item if selected
  129. ITEMTEXT equ $0002   ; set if textual, clear if graphical item
  130. COMMSEQ     equ $0004   ; set if there's an command sequence
  131. MENUTOGGLE  equ $0008   ; set to toggle the check of a menu item 
  132. ITEMENABLED equ $0010   ; set if this item is enabled
  133.  
  134. ; these are the SPECIAL HIGHLIGHT FLAG state meanings 
  135. HIGHFLAGS   equ $00C0   ; see definitions below for these bits
  136. HIGHIMAGE   equ $0000   ; use the user's "select image"
  137. HIGHCOMP equ $0040   ; highlight by complementing the select box
  138. HIGHBOX     equ $0080   ; highlight by drawing a box around the image
  139. HIGHNONE equ $00C0   ; don't highlight
  140.  
  141. ; --- FLAGS SET BY BOTH APPLIPROG AND INTUITION -----------------------------
  142. CHECKED equ $0100    ; if CHECKIT, then set this when selected
  143.  
  144.  
  145. ; --- FLAGS SET BY INTUITION ------------------------------------------------
  146. ISDRAWN     equ $1000   ; this item's subs are currently drawn
  147. HIGHITEM equ $2000   ; this item is currently highlighted
  148. MENUTOGGLED equ $4000   ; this item was already toggled 
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155. ; ========================================================================
  156. ; === Requester ==========================================================
  157. ; ========================================================================
  158.  STRUCTURE Requester,0
  159.  
  160.     ; the ClipRect and BitMap and used for rendering the requester
  161.     APTR  rq_OlderRequest
  162.     WORD rq_LeftEdge    ; dimensions of the entire box
  163.     WORD rq_TopEdge     ; dimensions of the entire box
  164.     WORD rq_Width    ; dimensions of the entire box
  165.     WORD rq_Height      ; dimensions of the entire box
  166.  
  167.     WORD rq_RelLeft     ; get POINTREL Pointer relativity offsets
  168.     WORD rq_RelTop      ; get POINTREL Pointer relativity offsets
  169.  
  170.     APTR  rq_ReqGadget        ; pointer to the first of a list of gadgets
  171.     APTR  rq_ReqBorder     ; the box's border
  172.     APTR  rq_ReqText    ; the box's text
  173.  
  174.     USHORT rq_Flags     ; see definitions below
  175.  
  176.     UBYTE rq_BackFill      ; pen number for back-plane fill before draws
  177.  
  178.     ; The following variable is strictly from Kludge-City, where some people
  179.     ; still live.  It is included solely because our types.i macros aren't
  180.     ; smart enough to do the right thing, which would be the automatic 
  181.     ; word-alignment to these references as it SHOULD be in order to duplicate
  182.     ; the way alignments are adjusted in the c-language.  And instead of 
  183.     ; correcting the problem, I am obliged to kludge up my include.i files.
  184.     ; So here it is!
  185.     BYTE rq_KludgeFill00   ; defined as a BYTE because this does
  186.  
  187.     APTR rq_ReqLayer    ; layer in which requester rendered
  188.     STRUCT rq_ReqPad1,32   ; for backwards compatibility (reserved)
  189.  
  190.     ; If the BitMap plane pointers are non-zero, this tells the system 
  191.     ; that the image comes pre-drawn (if the appliprog wants to define 
  192.     ; it's own box, in any shape or size it wants!); this is OK by 
  193.     ; Intuition as long as there's a good correspondence between the image 
  194.     ; and the specified Gadgets
  195.     APTR  rq_ReqBMap    ; points to the BitMap of PREDRAWN imagery
  196.  
  197.     APTR  rq_RWindow    ; points back to requester's window
  198.     STRUCT rq_ReqPad2,36   ; for backwards compatibility (reserved)
  199.  
  200.     LABEL rq_SIZEOF
  201.  
  202. ; FLAGS SET BY THE APPLIPROG
  203. POINTREL equ $0001  ; if POINTREL set, TopLeft is relative to pointer
  204. PREDRAWN equ $0002  ; if ReqBMap points to predrawn Requester imagery
  205.  
  206. ; FLAGS SET BY INTUITION;
  207. REQOFFWINDOW   equ $1000   ; part of one of the Gadgets was offwindow
  208. REQACTIVE   equ $2000   ; this requester is active
  209. SYSREQUEST  equ $4000   ; this requester caused by system
  210. DEFERREFRESH   equ $8000   ; this Requester stops a Refresh broadcast
  211.  
  212.  
  213.  
  214.  
  215.  
  216. ; ========================================================================
  217. ; === Gadget =============================================================
  218. ; ========================================================================
  219.  STRUCTURE Gadget,0
  220.  
  221.     APTR gg_NextGadget     ; next gadget in the list
  222.  
  223.     WORD gg_LeftEdge    ; "hit box" of gadget
  224.     WORD gg_TopEdge     ; "hit box" of gadget
  225.     WORD gg_Width    ; "hit box" of gadget
  226.     WORD gg_Height      ; "hit box" of gadget
  227.  
  228.     WORD gg_Flags       ; see below for list of defines
  229.  
  230.     WORD gg_Activation     ; see below for list of defines
  231.  
  232.     WORD gg_GadgetType     ; see below for defines
  233.  
  234.     ; appliprog can specify that the Gadget be rendered as either as Border
  235.     ; or an Image.  This variable points to which (or equals NULL if there's
  236.     ; nothing to be rendered about this Gadget)
  237.     APTR gg_GadgetRender
  238.  
  239.     ; appliprog can specify "highlighted" imagery rather than algorithmic
  240.     ; this can point to either Border or Image data
  241.     APTR gg_SelectRender
  242.  
  243.     APTR gg_GadgetText     ; text for this gadget;
  244.  
  245.     ; by using the MutualExclude word, the appliprog can describe 
  246.     ; which gadgets mutually-exclude which other ones.  The bits in 
  247.     ; MutualExclude correspond to the gadgets in object containing 
  248.     ; the gadget list.  If this gadget is selected and a bit is set 
  249.     ; in this gadget's MutualExclude and the gadget corresponding to 
  250.     ; that bit is currently selected (e.g. bit 2 set and gadget 2 
  251.     ; is currently selected) that gadget must be unselected.  Intuition 
  252.     ; does the visual unselecting (with checkmarks) and leaves it up 
  253.     ; to the program to unselect internally
  254.     LONG gg_MutualExclude  ; set bits mean this gadget excludes that
  255.  
  256.     ; pointer to a structure of special data required by Proportional, String 
  257.     ; and Integer Gadgets
  258.     APTR gg_SpecialInfo
  259.  
  260.     WORD gg_GadgetID ; user-definable ID field
  261.     APTR  gg_UserData   ; ptr to general purpose User data (ignored by Intuit)
  262.  
  263.     LABEL gg_SIZEOF
  264.  
  265. ; --- FLAGS SET BY THE APPLIPROG --------------------------------------------
  266. ; combinations in these bits describe the highlight technique to be used
  267. GADGHIGHBITS   equ $0003
  268. GADGHCOMP   equ $0000   ; Complement the select box
  269. GADGHBOX equ $0001   ; Draw a box around the image
  270. GADGHIMAGE  equ $0002   ; Blast in this alternate image
  271. GADGHNONE   equ $0003   ; don't highlight
  272.  
  273. ; set this flag if the GadgetRender and SelectRender point to Image imagery, 
  274. ; clear if it's a Border 
  275. GADGIMAGE   equ $0004 
  276.  
  277. ; combinations in these next two bits specify to which corner the gadget's
  278. ; Left & Top coordinates are relative.  If relative to Top/Left,
  279. ; these are "normal" coordinates (everything is relative to something in
  280. ; this universe)
  281. GRELBOTTOM  equ $0008   ; set if rel to bottom, clear if rel top
  282. GRELRIGHT   equ $0010   ; set if rel to right, clear if to left
  283. ; set the RELWIDTH bit to spec that Width is relative to width of screen
  284. GRELWIDTH   equ $0020
  285. ; set the RELHEIGHT bit to spec that Height is rel to height of screen
  286. GRELHEIGHT  equ $0040
  287.  
  288. ; the SELECTED flag is initialized by you and set by Intuition.  It 
  289. ; specifies whether or not this Gadget is currently selected/highlighted
  290. SELECTED equ $0080
  291.  
  292.  
  293. ; the GADGDISABLED flag is initialized by you and later set by Intuition
  294. ; according to your calls to On/OffGadget().  It specifies whether or not 
  295. ; this Gadget is currently disabled from being selected
  296. GADGDISABLED   equ $0100
  297.  
  298.  
  299. ; --- These are the Activation flag bits ----------------------------------
  300. ; RELVERIFY is set if you want to verify that the pointer was still over
  301. ; the gadget when the select button was released
  302. RELVERIFY   equ $0001
  303.  
  304. ; the flag GADGIMMEDIATE, when set, informs the caller that the gadget
  305. ; was activated when it was activated.  this flag works in conjunction with
  306. ; the RELVERIFY flag
  307. GADGIMMEDIATE  equ $0002
  308.  
  309. ; the flag ENDGADGET, when set, tells the system that this gadget, when
  310. ; selected, causes the Requester or AbsMessage to be ended.  Requesters or
  311. ; AbsMessages that are ended are erased and unlinked from the system
  312. ENDGADGET   equ $0004
  313.  
  314. ; the FOLLOWMOUSE flag, when set, specifies that you want to receive
  315. ; reports on mouse movements (ie, you want the REPORTMOUSE function for
  316. ; your Window).  When the Gadget is deselected (immediately if you have
  317. ; no RELVERIFY) the previous state of the REPORTMOUSE flag is restored
  318. ; You probably want to set the GADGIMMEDIATE flag when using FOLLOWMOUSE,
  319. ; since that's the only reasonable way you have of learning why Intuition
  320. ; is suddenly sending you a stream of mouse movement events.  If you don't
  321. ; set RELVERIFY, you'll get at least one Mouse Position event.
  322. FOLLOWMOUSE equ $0008
  323.  
  324. ; if any of the BORDER flags are set in a Gadget that's included in the
  325. ; Gadget list when a Window is opened, the corresponding Border will
  326. ; be adjusted to make room for the Gadget
  327. RIGHTBORDER equ $0010
  328. LEFTBORDER  equ $0020
  329. TOPBORDER   equ $0040
  330. BOTTOMBORDER   equ $0080
  331.  
  332. TOGGLESELECT   equ $0100   ; this bit for toggle-select mode
  333.  
  334. STRINGCENTER   equ $0200   ; center the String
  335. STRINGRIGHT equ $0400   ; right-justify the String
  336.  
  337. LONGINT     equ $0800   ; This String Gadget is a Long Integer
  338.  
  339. ALTKEYMAP   equ $1000   ; This String has an alternate keymapping
  340.  
  341.  
  342. ; --- GADGET TYPES -----------------------------------------------------------
  343. ; These are the Gaget Type definitions for the variable GadgetType.
  344. ; Gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  345. ; first comes the mask for Gadget flags reserved for Gadget typing
  346. GADGETTYPE  equ $FC00   ; all Gadget Global Type flags (padded)
  347. SYSGADGET   equ $8000   ; 1 = SysGadget, 0 = AppliGadget
  348. SCRGADGET   equ $4000   ; 1 = ScreenGadget, 0 = WindowGadget
  349. GZZGADGET   equ $2000   ; 1 = Gadget for GIMMEZEROZERO borders
  350. REQGADGET   equ $1000   ; 1 = this is a Requester Gadget
  351. ; system gadgets
  352. SIZING      equ $0010
  353. WDRAGGING   equ $0020
  354. SDRAGGING   equ $0030
  355. WUPFRONT equ $0040
  356. SUPFRONT equ $0050
  357. WDOWNBACK   equ $0060
  358. SDOWNBACK   equ $0070
  359. CLOSE    equ $0080
  360. ; application gadgets
  361. BOOLGADGET  equ $0001
  362. GADGET0002  equ $0002
  363. PROPGADGET  equ $0003
  364. STRGADGET   equ $0004
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371. ; ========================================================================
  372. ; === PropInfo ===========================================================
  373. ; ========================================================================
  374. ; this is the special data required by the proportional Gadget
  375. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  376.  STRUCTURE PropInfo,0
  377.  
  378.     WORD pi_Flags ; general purpose flag bits (see defines below)
  379.  
  380.     ; You initialize the Pot variables before the Gadget is added to 
  381.     ; the system.  Then you can look here for the current settings 
  382.     ; any time, even while User is playing with this Gadget.  To 
  383.     ; adjust these after the Gadget is added to the System, use 
  384.     ; ModifyProp(); The Pots are the actual proportional settings, 
  385.     ; where a value of zero means zero and a value of MAXPOT means 
  386.     ; that the Gadget is set to its maximum setting.
  387.     WORD pi_HorizPot ; 16-bit FixedPoint horizontal quantity percentage;
  388.     WORD pi_VertPot  ; 16-bit FixedPoint vertical quantity percentage;
  389.  
  390.     ; the 16-bit FixedPoint Body variables describe what percentage 
  391.     ; of the entire body of stuff referred to by this Gadget is 
  392.     ; actually shown at one time.  This is used with the AUTOKNOB 
  393.     ; routines, to adjust the size of the AUTOKNOB according to how 
  394.     ; much of the data can be seen.  This is also used to decide how 
  395.     ; far to advance the Pots when User hits the Container of the Gadget.  
  396.     ; For instance, if you were controlling the display of a 5-line 
  397.     ; Window of text with this Gadget, and there was a total of 15 
  398.     ; lines that could be displayed, you would set the VertBody value to 
  399.     ;    (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  400.     ; Therefore, the AUTOKNOB would fill 1/3 of the container, and if 
  401.     ; User hits the Cotainer outside of the knob, the pot would advance 
  402.     ; 1/3 (plus or minus) If there's no body to show, or the total 
  403.     ; amount of displayable info is less than the display area, set the 
  404.     ; Body variables to the MAX.  To adjust these after the Gadget is 
  405.     ; added to the System, use ModifyProp().
  406.     WORD pi_HorizBody   ; horizontal Body
  407.     WORD pi_VertBody ; vertical Body
  408.  
  409.     ; these are the variables that Intuition sets and maintains
  410.     WORD pi_CWidth   ; Container width (with any relativity absoluted)
  411.     WORD pi_CHeight  ; Container height (with any relativity absoluted)
  412.     WORD pi_HPotRes  ; pot increments
  413.     WORD pi_VPotRes  ; pot increments
  414.     WORD pi_LeftBorder  ; Container borders
  415.     WORD pi_TopBorder   ; Container borders
  416.     LABEL  pi_SIZEOF
  417.  
  418. ; --- FLAG BITS --------------------------------------------------------------
  419. AUTOKNOB equ $0001   ; this flag sez:  gimme that old auto-knob
  420. FREEHORIZ   equ $0002   ; if set, the knob can move horizontally
  421. FREEVERT equ $0004   ; if set, the knob can move vertically
  422. PROPBORDERLESS equ $0008   ; if set, no border will be rendered
  423. KNOBHIT     equ $0100   ; set when this Knob is hit
  424.  
  425.  
  426. KNOBHMIN equ 6    ; minimum horizontal size of the knob
  427. KNOBVMIN    equ 4    ; minimum vertical size of the knob
  428. MAXBODY     equ $FFFF   ; maximum body value
  429. MAXPOT      equ $FFFF   ; maximum pot value
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436. ; ========================================================================
  437. ; === StringInfo =========================================================
  438. ; ========================================================================
  439. ; this is the special data required by the string Gadget
  440. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  441.  STRUCTURE StringInfo,0
  442.  
  443.     ; you initialize these variables, and then Intuition maintains them
  444.     APTR  si_Buffer  ; the buffer containing the start and final string
  445.     APTR  si_UndoBuffer ; optional buffer for undoing current entry
  446.     WORD si_BufferPos   ; character position in Buffer
  447.     WORD si_MaxChars ; max number of chars in Buffer (including NULL)
  448.     WORD si_DispPos  ; Buffer position of first displayed character
  449.  
  450.     ; Intuition initializes and maintains these variables for you
  451.     WORD si_UndoPos  ; character position in the undo buffer
  452.     WORD si_NumChars ; number of characters currently in Buffer
  453.     WORD si_DispCount   ; number of whole characters visible in Container
  454.     WORD si_CLeft ; topleft offset of the container
  455.     WORD si_CTop  ; topleft offset of the container
  456.     APTR  si_LayerPtr   ; the RastPort containing this Gadget
  457.  
  458.     ; you can initialize this variable before the gadget is submitted to
  459.     ; Intuition, and then examine it later to discover what integer 
  460.     ; the user has entered (if the user never plays with the gadget, 
  461.     ; the value will be unchanged from your initial setting)
  462.     LONG  si_LongInt ; the LONG return value of a LONGINT String Gadget
  463.  
  464.     ; If you want this Gadget to use your own Console keymapping, you
  465.     ; set the ALTKEYMAP bit in the Activation flags of the Gadget, and then
  466.     ; set this variable to point to your keymap.  If you don't set the
  467.     ; ALTKEYMAP, you'll get the standard ASCII keymapping.
  468.     APTR si_AltKeyMap
  469.  
  470.     LABEL si_SIZEOF
  471.  
  472.  
  473.  
  474.  
  475. ; ========================================================================
  476. ; === IntuiText ==========================================================
  477. ; ========================================================================
  478. ; IntuiText is a series of strings that start with a screen location
  479. ; (always relative to the upper-left corner of something) and then the
  480. ; text of the string.  The text is null-terminated.
  481.  STRUCTURE IntuiText,0
  482.  
  483.     UBYTE it_FrontPen      ; the pens for rendering the text
  484.     UBYTE it_BackPen    ; the pens for rendering the text
  485.  
  486.     UBYTE it_DrawMode      ; the mode for rendering the text
  487.  
  488.     ; The following variable is strictly from Kludge-City, where some people
  489.     ; still live.  It is included solely because our types.i macros aren't
  490.     ; smart enough to do the right thing, which would be the automatic 
  491.     ; word-alignment to these references as it SHOULD be in order to duplicate
  492.     ; the way alignments are adjusted in the c-language.  And instead of 
  493.     ; correcting the problem, I am obliged to kludge up my include.i files.
  494.     ; So here it is!
  495.     BYTE it_KludgeFill00   ; defined as a BYTE because this does
  496.  
  497.     WORD it_LeftEdge    ; relative start location for the text
  498.     WORD it_TopEdge     ; relative start location for the text
  499.  
  500.     APTR  it_ITextFont     ; if NULL, you accept the defaults
  501.  
  502.     APTR it_IText    ; pointer to null-terminated text
  503.  
  504.     APTR  it_NextText      ; continuation to TxWrite another text
  505.  
  506.     LABEL it_SIZEOF
  507.  
  508.  
  509.  
  510.  
  511.  
  512. ; ========================================================================
  513. ; === Border =============================================================
  514. ; ========================================================================
  515. ; Data type Border, used for drawing a series of lines which is intended for
  516. ; use as a border drawing, but which may, in fact, be used to render any
  517. ; arbitrary vector shape.
  518. ; The routine DrawBorder sets up the RastPort with the appropriate
  519. ; variables, then does a Move to the first coordinate, then does Draws
  520. ; to the subsequent coordinates.
  521. ; After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  522. ; recursively
  523.  STRUCTURE Border,0
  524.  
  525.     WORD bd_LeftEdge    ; initial offsets from the origin
  526.     WORD bd_TopEdge     ; initial offsets from the origin
  527.     UBYTE bd_FrontPen      ; pen number for rendering 
  528.     UBYTE bd_BackPen    ; pen number for rendering 
  529.     UBYTE bd_DrawMode      ; mode for rendering 
  530.     BYTE  bd_Count      ; number of XY pairs
  531.     APTR  bd_XY         ; vector coordinate pairs rel to LeftTop
  532.     APTR  bd_NextBorder    ; pointer to any other Border too
  533.  
  534.     LABEL bd_SIZEOF
  535.  
  536.  
  537. ; ======================================================================== 
  538. ; === Image ============================================================== 
  539. ; ======================================================================== 
  540. ; This is a brief image structure for very simple transfers of 
  541. ; image data to a RastPort
  542.  STRUCTURE Image,0
  543.  
  544.     WORD ig_LeftEdge    ; starting offset relative to something 
  545.     WORD ig_TopEdge     ; starting offset relative to something 
  546.     WORD ig_Width    ; pixel size (though data is word-aligned)
  547.     WORD ig_Height      ; pixel size 
  548.     WORD ig_Depth    ; pixel size 
  549.     APTR ig_ImageData      ; pointer to the actual image bits
  550.  
  551.     ; the PlanePick and PlaneOnOff variables work much the same way as the
  552.     ; equivalent GELS Bob variables.  It's a space-saving 
  553.     ; mechanism for image data.  Rather than defining the image data
  554.     ; for every plane of the RastPort, you need define data only for planes 
  555.     ; that are not entirely zero or one.  As you define your Imagery, you will
  556.     ; often find that most of the planes ARE just as color selectors.  For
  557.     ; instance, if you're designing a two-color Gadget to use colors two and
  558.     ; three, and the Gadget will reside in a five-plane display, plane zero
  559.     ; of your imagery would be all ones, bit plane one would have data that
  560.     ; describes the imagery, and bit planes two through four would be
  561.     ; all zeroes.  Using these flags allows you to avoid wasting all that 
  562.     ; memory in this way:  
  563.     ; first, you specify which planes you want your data to appear 
  564.     ; in using the PlanePick variable.  For each bit set in the variable, the 
  565.     ; next "plane" of your image data is blitted to the display.  For each bit
  566.     ; clear in this variable, the corresponding bit in PlaneOnOff is examined.
  567.     ; If that bit is clear, a "plane" of zeroes will be used.  If the bit is 
  568.     ; set, ones will go out instead.  So, for our example:
  569.     ;   Gadget.PlanePick = 0x02;
  570.     ;   Gadget.PlaneOnOff = 0x01;
  571.     ; Note that this also allows for generic Gadgets, like the System Gadgets,
  572.     ; which will work in any number of bit planes
  573.     ; Note also that if you want an Image that is only a filled rectangle,
  574.     ; you can get this by setting PlanePick to zero (pick no planes of data)
  575.     ; and set PlaneOnOff to describe the pen color of the rectangle.
  576.     BYTE ig_PlanePick
  577.     BYTE ig_PlaneOnOff
  578.  
  579.     ; if the NextImage variable is not NULL, Intuition presumes that 
  580.     ; it points to another Image structure with another Image to be 
  581.     ; rendered
  582.     APTR ig_NextImage
  583.  
  584.  
  585.     LABEL ig_SIZEOF
  586.  
  587.  
  588.  
  589.  
  590. ; ======================================================================== 
  591. ; === IntuiMessage ======================================================= 
  592. ; ======================================================================== 
  593.  STRUCTURE IntuiMessage,0
  594.  
  595.     STRUCT im_ExecMessage,MN_SIZE
  596.  
  597.     ; the Class bits correspond directly with the IDCMP Flags, except for the
  598.     ; special bit LONELYMESSAGE (defined below)
  599.     ULONG im_Class
  600.  
  601.     ; the Code field is for special values like MENU number 
  602.     WORD im_Code
  603.  
  604.     ; the Qualifier field is a copy of the current InputEvent's Qualifier 
  605.     WORD im_Qualifier
  606.  
  607.     ; IAddress contains particular addresses for Intuition functions, like
  608.     ; the pointer to the Gadget or the Screen
  609.     APTR im_IAddress
  610.  
  611.     ; when getting mouse movement reports, any event you get will have the
  612.     ; the mouse coordinates in these variables.  the coordinates are relative
  613.     ; to the upper-left corner of your Window (GIMMEZEROZERO notwithstanding)
  614.     WORD im_MouseX
  615.     WORD im_MouseY
  616.  
  617.     ; the time values are copies of the current system clock time.  Micros
  618.     ; are in units of microseconds, Seconds in seconds.
  619.     LONG im_Seconds
  620.     LONG im_Micros
  621.  
  622.     ; the IDCMPWindow variable will always have the address of the Window of 
  623.     ; this IDCMP 
  624.     APTR im_IDCMPWindow
  625.  
  626.     ; system-use variable 
  627.     APTR im_SpecialLink
  628.  
  629.     LABEL  im_SIZEOF
  630.  
  631.  
  632.  
  633. ; --- IDCMP Classes ------------------------------------------------------ 
  634. SIZEVERIFY  equ   $00000001   ; See the Programmer's Guide
  635. NEWSIZE     equ   $00000002   ; See the Programmer's Guide
  636. REFRESHWINDOW  equ   $00000004   ; See the Programmer's Guide
  637. MOUSEBUTTONS   equ   $00000008   ; See the Programmer's Guide
  638. MOUSEMOVE   equ   $00000010   ; See the Programmer's Guide 
  639. GADGETDOWN  equ   $00000020   ; See the Programmer's Guide
  640. GADGETUP equ   $00000040   ; See the Programmer's Guide 
  641. REQSET      equ   $00000080   ; See the Programmer's Guide
  642. MENUPICK equ   $00000100   ; See the Programmer's Guide 
  643. CLOSEWINDOW equ   $00000200   ; See the Programmer's Guide
  644. RAWKEY      equ   $00000400   ; See the Programmer's Guide 
  645. REQVERIFY   equ   $00000800   ; See the Programmer's Guide
  646. REQCLEAR equ   $00001000   ; See the Programmer's Guide 
  647. MENUVERIFY  equ   $00002000   ; See the Programmer's Guide
  648. NEWPREFS equ   $00004000   ; See the Programmer's Guide 
  649. DISKINSERTED   equ   $00008000   ; See the Programmer's Guide
  650. DISKREMOVED equ   $00010000   ; See the Programmer's Guide 
  651. WBENCHMESSAGE  equ   $00020000   ; See the Programmer's Guide
  652. ACTIVEWINDOW   equ   $00040000   ; See the Programmer's Guide
  653. INACTIVEWINDOW equ   $00080000   ; See the Programmer's Guide
  654. DELTAMOVE   equ   $00100000   ; See the Programmer's Guide
  655. VANILLAKEY  equ   $00200000   ; See the Programmer's Guide
  656. INTUITICKS  equ   $00400000   ; See the Programmer's Guide
  657. ; NOTEZ-BIEN:     $80000000 is reserved for internal use by IDCMP
  658.  
  659. ; the IDCMP Flags do not use this special bit, which is cleared when
  660. ; Intuition sends its special message to the Task, and set when Intuition
  661. ; gets its Message back from the Task.  Therefore, I can check here to
  662. ; find out fast whether or not this Message is available for me to send
  663. LONELYMESSAGE  equ   $80000000
  664.  
  665.  
  666.  
  667. ; --- IDCMP Codes -------------------------------------------------------- 
  668. ; This group of codes is for the MENUVERIFY function 
  669. MENUHOT     equ   $0001 ; IntuiWants verification or MENUCANCEL    
  670. MENUCANCEL  equ   $0002 ; HOT Reply of this cancels Menu operation 
  671. MENUWAITING equ   $0003 ; Intuition simply wants a ReplyMsg() ASAP 
  672.  
  673. ; This group of codes is for the WBENCHMESSAGE messages
  674. WBENCHOPEN  equ $0001
  675. WBENCHCLOSE equ $0002
  676.  
  677.  
  678.  
  679.  
  680. ; ======================================================================== 
  681. ; === Window ============================================================= 
  682. ; ======================================================================== 
  683.  STRUCTURE Window,0
  684.  
  685.     APTR wd_NextWindow     ; for the linked list of a Screen
  686.  
  687.     WORD wd_LeftEdge    ; screen dimensions
  688.     WORD wd_TopEdge     ; screen dimensions
  689.     WORD wd_Width    ; screen dimensions
  690.     WORD wd_Height      ; screen dimensions
  691.  
  692.     WORD wd_MouseY      ; relative top top-left corner 
  693.     WORD wd_MouseX      ; relative top top-left corner 
  694.  
  695.     WORD wd_MinWidth    ; minimum sizes
  696.     WORD wd_MinHeight      ; minimum sizes
  697.     WORD wd_MaxWidth    ; maximum sizes
  698.     WORD wd_MaxHeight      ; maximum sizes
  699.  
  700.     LONG wd_Flags    ; see below for definitions
  701.  
  702.     APTR wd_MenuStrip      ; first in a list of menu headers
  703.  
  704.     APTR wd_Title    ; title text for the Window
  705.  
  706.     APTR wd_FirstRequest   ; first in linked list of active Requesters 
  707.     APTR wd_DMRequest      ; the double-menu Requester 
  708.     WORD wd_ReqCount    ; number of Requesters blocking this Window
  709.     APTR wd_WScreen     ; this Window's Screen
  710.     APTR wd_RPort    ; this Window's very own RastPort
  711.  
  712.     ; the border variables describe the window border.  If you specify
  713.     ; GIMMEZEROZERO when you open the window, then the upper-left of the
  714.     ; ClipRect for this window will be upper-left of the BitMap (with correct
  715.     ; offsets when in SuperBitMap mode; you MUST select GIMMEZEROZERO when
  716.     ; using SuperBitMap).  If you don't specify ZeroZero, then you save
  717.     ; memory (no allocation of RastPort, Layer, ClipRect and associated
  718.     ; Bitmaps), but you also must offset all your writes by BorderTop,
  719.     ; BorderLeft and do your own mini-clipping to prevent writing over the
  720.     ; system gadgets
  721.     BYTE wd_BorderLeft
  722.     BYTE wd_BorderTop
  723.     BYTE wd_BorderRight
  724.     BYTE wd_BorderBottom
  725.     APTR wd_BorderRPort
  726.  
  727.     ; You supply a linked-list of gadget that you want for your Window.
  728.     ; This list DOES NOT include system Gadgets.  You get the standard
  729.     ; window system Gadgets by setting flag-bits in the variable Flags (see
  730.     ; the bit definitions below)
  731.     APTR wd_FirstGadget
  732.  
  733.     ; these are for opening/closing the windows 
  734.     APTR wd_Parent
  735.     APTR wd_Descendant
  736.  
  737.     ; sprite data information for your own Pointer
  738.     ; set these AFTER you Open the Window by calling SetPointer()
  739.     APTR wd_Pointer
  740.     BYTE wd_PtrHeight
  741.     BYTE wd_PtrWidth
  742.     BYTE wd_XOffset
  743.     BYTE wd_YOffset
  744.  
  745.     ; the IDCMP Flags and User's and Intuition's Message Ports 
  746.     ULONG wd_IDCMPFlags
  747.     APTR wd_UserPort
  748.     APTR wd_WindowPort
  749.     APTR wd_MessageKey
  750.  
  751.     BYTE wd_DetailPen
  752.     BYTE wd_BlockPen
  753.  
  754.     ; the CheckMark is a pointer to the imagery that will be used when 
  755.     ; rendering MenuItems of this Window that want to be checkmarked
  756.     ; if this is equal to NULL, you'll get the default imagery
  757.     APTR wd_CheckMark
  758.  
  759.     ; if non-null, Screen title when Window is active 
  760.     APTR wd_ScreenTitle
  761.  
  762.     ; These variables have the mouse coordinates relative to the 
  763.     ; inner-Window of GIMMEZEROZERO Windows.  This is compared with the
  764.     ; MouseX and MouseY variables, which contain the mouse coordinates
  765.     ; relative to the upper-left corner of the Window, GIMMEZEROZERO
  766.     ; notwithstanding
  767.     SHORT wd_GZZMouseX
  768.     SHORT wd_GZZMouseY
  769.     ; these variables contain the width and height of the inner-Window of
  770.     ; GIMMEZEROZERO Windows
  771.     SHORT wd_GZZWidth
  772.     SHORT wd_GZZHeight
  773.  
  774.     APTR wd_ExtData
  775.  
  776.     ; general-purpose pointer to User data extension 
  777.     APTR wd_UserData
  778.     APTR wd_WLayer   ; stash of Window.RPort->Layer
  779.  
  780.     LABEL wd_Size
  781.  
  782. ; --- FLAGS REQUESTED (NOT DIRECTLY SET THOUGH) BY THE APPLIPROG -------------
  783. WINDOWSIZING   equ $0001   ; include sizing system-gadget? 
  784. WINDOWDRAG     equ $0002   ; include dragging system-gadget? 
  785. WINDOWDEPTH    equ $0004   ; include depth arrangement gadget? 
  786. WINDOWCLOSE    equ $0008   ; include close-box system-gadget? 
  787.  
  788. SIZEBRIGHT  equ $0010   ; size gadget uses right border 
  789. SIZEBBOTTOM equ $0020   ; size gadget uses bottom border 
  790.  
  791. ; --- refresh modes ----------------------------------------------------------
  792. ; combinations of the REFRESHBITS select the refresh type 
  793. REFRESHBITS equ $00C0
  794. SMART_REFRESH  equ $0000
  795. SIMPLE_REFRESH equ $0040
  796. SUPER_BITMAP   equ $0080
  797. OTHER_REFRESH  equ $00C0
  798.  
  799. BACKDROP equ $0100   ; this is an ever-popular BACKDROP window 
  800.  
  801. REPORTMOUSE equ $0200   ; set this to hear about every mouse move 
  802.  
  803. GIMMEZEROZERO  equ $0400   ; make extra border stuff 
  804.  
  805. BORDERLESS  equ $0800   ; set this to get a Window sans border 
  806.  
  807. ACTIVATE equ $1000   ; when Window opens, it's the Active one 
  808.  
  809. ; FLAGS SET BY INTUITION 
  810. WINDOWACTIVE   equ $2000   ; this window is the active one 
  811. INREQUEST      equ $4000   ; this window is in request mode 
  812. MENUSTATE      equ $8000   ; this Window is active with its Menus on 
  813.  
  814. ; --- Other User Flags -------------------------------------------------------
  815. RMBTRAP     equ $00010000  ; Catch RMB events for your own 
  816. NOCAREREFRESH  equ $00020000  ; not to be bothered with REFRESH
  817.  
  818.  
  819. WINDOWREFRESH  equ $01000000  ; Window is currently refreshing
  820. WBENCHWINDOW   equ $02000000  ; WorkBench Window
  821. WINDOWTICKED   equ $04000000  ; only one timer tick at a time
  822.  
  823. SUPER_UNUSED   equ $FCFC0000  ;bits of Flag unused yet
  824.  
  825.  
  826.  
  827.  
  828. ; --- see struct IntuiMessage for the IDCMP Flag definitions -----------------
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838. ; ======================================================================== 
  839. ; === NewWindow ========================================================== 
  840. ; ======================================================================== 
  841.  STRUCTURE NewWindow,0
  842.  
  843.     WORD nw_LeftEdge    ; initial Window dimensions
  844.     WORD nw_TopEdge     ; initial Window dimensions
  845.     WORD nw_Width    ; initial Window dimensions
  846.     WORD nw_Height      ; initial Window dimensions
  847.  
  848.     BYTE nw_DetailPen      ; for rendering the detail bits of the Window
  849.     BYTE nw_BlockPen    ; for rendering the block-fill bits 
  850.  
  851.     ULONG nw_IDCMPFlags    ; initial IDCMP state
  852.  
  853.     LONG nw_Flags    ; see the Flag definition under Window
  854.  
  855.     ; You supply a linked-list of Gadgets for your Window.
  856.     ; This list DOES NOT include system Gadgets.  You get the standard
  857.     ; system Window Gadgets by setting flag-bits in the variable Flags (see
  858.     ; the bit definitions under the Window structure definition)
  859.     APTR nw_FirstGadget
  860.  
  861.     ; the CheckMark is a pointer to the imagery that will be used when 
  862.     ; rendering MenuItems of this Window that want to be checkmarked
  863.     ; if this is equal to NULL, you'll get the default imagery
  864.     APTR nw_CheckMark
  865.  
  866.     APTR nw_Title    ; title text for the Window
  867.     
  868.     ; the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  869.     ; want this Window to open in it.  If so, you pass the address of the
  870.     ; Custom Screen structure in this variable.  Otherwise, this variable
  871.     ; is ignored and doesn't have to be initialized.
  872.     APTR nw_Screen
  873.     
  874.     ; SUPER_BITMAP Window?  If so, put the address of your BitMap structure
  875.     ; in this variable.  If not, this variable is ignored and doesn't have 
  876.     ; to be initialized
  877.     APTR nw_BitMap
  878.  
  879.     ; the values describe the minimum and maximum sizes of your Windows.
  880.     ; these matter only if you've chosen the WINDOWSIZING Gadget option,
  881.     ; which means that you want to let the User to change the size of 
  882.     ; this Window.  You describe the minimum and maximum sizes that the
  883.     ; Window can grow by setting these variables.  You can initialize
  884.     ; any one these to zero, which will mean that you want to duplicate
  885.     ; the setting for that dimension (if MinWidth == 0, MinWidth will be
  886.     ; set to the opening Width of the Window).
  887.     ; You can change these settings later using SetWindowLimits().
  888.     ; If you haven't asked for a SIZING Gadget, you don't have to
  889.     ; initialize any of these variables.
  890.     WORD nw_MinWidth
  891.     WORD nw_MinHeight
  892.     WORD nw_MaxWidth
  893.     WORD nw_MaxHeight
  894.  
  895.     ; the type variable describes the Screen in which you want this Window to
  896.     ; open.  The type value can either be CUSTOMSCREEN or one of the
  897.     ; system standard Screen Types such as WBENCHSCREEN.  See the
  898.     ; type definitions under the Screen structure
  899.     WORD nw_Type
  900.  
  901.     LABEL nw_SIZE
  902.  
  903.  
  904.  
  905.  
  906. ; ======================================================================== 
  907. ; === Screen ============================================================= 
  908. ; ======================================================================== 
  909.  STRUCTURE Screen,0
  910.  
  911.     APTR sc_NextScreen     ; linked list of screens
  912.     APTR sc_FirstWindow    ; linked list Screen's Windows
  913.  
  914.     WORD sc_LeftEdge    ; parameters of the screen
  915.     WORD sc_TopEdge     ; parameters of the screen
  916.  
  917.     WORD sc_Width    ; null-terminated Title text
  918.     WORD sc_Height      ; for Windows without ScreenTitle
  919.  
  920.     WORD sc_MouseY      ; position relative to upper-left
  921.     WORD sc_MouseX      ; position relative to upper-left
  922.  
  923.     WORD sc_Flags    ; see definitions below
  924.  
  925.     APTR sc_Title
  926.     APTR sc_DefaultTitle
  927.  
  928.     ; Bar sizes for this Screen and all Window's in this Screen
  929.     BYTE sc_BarHeight
  930.     BYTE sc_BarVBorder
  931.     BYTE sc_BarHBorder
  932.     BYTE sc_MenuVBorder
  933.     BYTE sc_MenuHBorder
  934.     BYTE sc_WBorTop
  935.     BYTE sc_WBorLeft
  936.     BYTE sc_WBorRight
  937.     BYTE sc_WBorBottom
  938.  
  939.     ; The following variable is strictly from Kludge-City, where some people
  940.     ; still live.  It is included solely because our types.i macros aren't
  941.     ; smart enough to do the right thing, which would be the automatic 
  942.     ; word-alignment to these references as it SHOULD be in order to duplicate
  943.     ; the way alignments are adjusted in the c-language.  And instead of 
  944.     ; correcting the problem, I am obliged to kludge up my include.i files.
  945.     ; So here it is!
  946.     BYTE sc_KludgeFill00   ; defined as a BYTE because this does
  947.  
  948.     ; the display data structures for this Screen
  949.     APTR sc_Font        ; this screen's default font
  950.     STRUCT sc_ViewPort,vp_SIZEOF ; describing the Screen's display
  951.     STRUCT sc_RastPort,rp_SIZEOF ; describing Screen rendering
  952.     STRUCT sc_BitMap,bm_SIZEOF      ; auxiliary graphexcess baggage
  953.     STRUCT sc_LayerInfo,li_SIZEOF   ; each screen gets a LayerInfo
  954.  
  955.     ; You supply a linked-list of Gadgets for your Screen.
  956.     ; This list DOES NOT include system Gadgets.  You get the standard
  957.     ; system Screen Gadgets by default
  958.     APTR sc_FirstGadget
  959.  
  960.     BYTE sc_DetailPen      ; for bar/border/gadget rendering
  961.     BYTE sc_BlockPen    ; for bar/border/gadget rendering
  962.  
  963.     ; the following variable(s) are maintained by Intuition to support the
  964.     ; DisplayBeep() color flashing technique
  965.     WORD sc_SaveColor0
  966.  
  967.     ; This layer is for the Screen and Menu bars
  968.     APTR BarLayer; 
  969.  
  970.     APTR sc_ExtData
  971.  
  972.     APTR sc_UserData    ; general-purpose pointer to User data 
  973.  
  974.     LABEL sc_SIZEOF
  975.  
  976.  
  977. ; --- FLAGS SET BY INTUITION -------------------------------------------------
  978. ; The SCREENTYPE bits are reserved for describing various Screen types
  979. ; available under Intuition.  
  980. SCREENTYPE  equ   $000F ; all the screens types available 
  981. ; --- the definitions for the Screen Type ------------------------------------
  982. WBENCHSCREEN   equ   $0001 ; Ta Da!  The Workbench
  983. CUSTOMSCREEN   equ   $000F ; for that special look
  984.  
  985. SHOWTITLE   equ   $0010 ; this gets set by a call to ShowTitle() 
  986.  
  987. BEEPING     equ   $0020 ; set when Screen is beeping 
  988.  
  989. CUSTOMBITMAP   equ   $0040 ; if you are supplying your own BitMap
  990.  
  991.  
  992.  
  993.  
  994. ; ======================================================================== 
  995. ; === NewScreen ========================================================== 
  996. ; ======================================================================== 
  997.  STRUCTURE NewScreen,0
  998.  
  999.     WORD ns_LeftEdge    ; initial Screen dimensions
  1000.     WORD ns_TopEdge     ; initial Screen dimensions
  1001.     WORD ns_Width    ; initial Screen dimensions
  1002.     WORD ns_Height      ; initial Screen dimensions
  1003.     WORD ns_Depth    ; initial Screen dimensions
  1004.  
  1005.     BYTE ns_DetailPen      ; default rendering pens (for Windows too)
  1006.     BYTE ns_BlockPen    ; default rendering pens (for Windows too)
  1007.  
  1008.     WORD ns_ViewModes      ; display "modes" for this Screen
  1009.  
  1010.     WORD ns_Type     ; Intuition Screen Type specifier
  1011.  
  1012.     APTR ns_Font     ; default font for Screen and Windows
  1013.  
  1014.     APTR ns_DefaultTitle   ; Title when Window doesn't care
  1015.  
  1016.     APTR ns_Gadgets     ; Your own initial Screen Gadgets
  1017.  
  1018.     ; if you are opening a CUSTOMSCREEN and already have a BitMap 
  1019.     ; that you want used for your Screen, you set the flags CUSTOMBITMAP in
  1020.     ; the Types variable and you set this variable to point to your BitMap
  1021.     ; structure.  The structure will be copied into your Screen structure,
  1022.     ; after which you may discard your own BitMap if you want
  1023.     APTR ns_CustomBitMap;
  1024.  
  1025.  LABEL    ns_SIZEOF
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034. ; ======================================================================== 
  1035. ; === Preferences ======================================================== 
  1036. ; ======================================================================== 
  1037.  
  1038. ; these are the definitions for the printer configurations 
  1039. FILENAME_SIZE equ 30       ; Filename size 
  1040.  
  1041. POINTERSIZE    equ   (1+16+1)*2  ; Size of Pointer data buffer 
  1042.  
  1043. ; These defines are for the default font size.  These actually describe the
  1044. ; height of the defaults fonts.  The default font type is the topaz
  1045. ; font, which is a fixed width font that can be used in either 
  1046. ; eighty-column or sixty-column mode.  The Preferences structure reflects
  1047. ; which is currently selected by the value found in the variable FontSize,
  1048. ; which may have either of the values defined below.  These values actually
  1049. ; are used to select the height of the default font.  By changing the
  1050. ; height, the resolution of the font changes as well.
  1051. TOPAZ_EIGHTY   equ   8  
  1052. TOPAZ_SIXTY    equ   9
  1053.  
  1054. ; ------------------------------------------------------------------------
  1055.  STRUCTURE Preferences,0
  1056.  
  1057.     ; the default font height
  1058.     BYTE pf_FontHeight     ; height for system default font
  1059.  
  1060.     ; constant describing what's hooked up to the port
  1061.     UBYTE pf_PrinterPort   ; printer port connection
  1062.  
  1063.     ; the baud rate of the port
  1064.     USHORT pf_BaudRate     ; baud rate for the serial port
  1065.     
  1066.     ; various timing rates
  1067.     STRUCT pf_KeyRptSpeed,TV_SIZE ; repeat speed for keyboard
  1068.     STRUCT pf_KeyRptDelay,TV_SIZE ; Delay before keys repeat
  1069.     STRUCT pf_DoubleClick,TV_SIZE ; Interval allowed between clicks
  1070.  
  1071.     ; Intuition Pointer data
  1072.     STRUCT pf_PointerMatrix,POINTERSIZE*2 ; Definition of pointer sprite
  1073.     BYTE pf_XOffset     ; X-Offset for active 'bit'
  1074.     BYTE pf_YOffset     ; Y-Offset for active 'bit'
  1075.     WORD pf_color17     ;********************************
  1076.     WORD pf_color18     ; Colours for sprite pointer
  1077.     WORD pf_color19     ;********************************
  1078.     WORD pf_PointerTicks   ; Sensitivity of the pointer
  1079.  
  1080.     ; Workbench Screen colors
  1081.     WORD pf_color0      ;********************************
  1082.     WORD pf_color1      ;  Standard default colours
  1083.     WORD pf_color2      ;   Used in the Workbench
  1084.     WORD pf_color3      ;********************************
  1085.  
  1086.     ; positioning data for the Intuition View
  1087.     BYTE pf_ViewXOffset    ; Offset for top lefthand corner
  1088.     BYTE pf_ViewYOffset    ; X and Y dimensions
  1089.     WORD pf_ViewInitX      ; View initial offsets at startup
  1090.     WORD pf_ViewInitY      ; View initial offsets at startup
  1091.  
  1092.     BOOL EnableCLI      ; CLI availability switch
  1093.  
  1094.     ; printer configurations
  1095.     WORD pf_PrinterType    ; printer type
  1096.     STRUCT pf_PrinterFilename,FILENAME_SIZE ; file for printer
  1097.  
  1098.     ; print format and quality configurations
  1099.     SHORT pf_PrintPitch       ; print pitch
  1100.     WORD pf_PrintQuality   ; print quality
  1101.     WORD pf_PrintSpacing   ; number of lines per inch
  1102.     UWORD pf_PrintLeftMargin  ; left margin in characters
  1103.     UWORD pf_PrintRightMargin ; right margin in characters
  1104.     WORD  pf_PrintImage    ; positive or negative
  1105.     WORD pf_PrintAspect    ; horizontal or vertical
  1106.     WORD pf_PrintShade     ; b&w, half-tone, or color
  1107.     WORD pf_PrintThreshold ; darkness ctrl for b/w dumps
  1108.  
  1109.  
  1110.     ; print paper description
  1111.     WORD pf_PaperSize      ; paper size
  1112.     UWORD pf_PaperLength   ; paper length in lines
  1113.     WORD pf_PaperType      ; continuous or single sheet
  1114.  
  1115.     STRUCT pf_padding,50   ; For further system expansion
  1116.  
  1117.     LABEL pf_SIZEOF
  1118.  
  1119.  
  1120. ; === Preferences definitions ===========================================
  1121.  
  1122. ; PrinterPort
  1123. PARALLEL_PRINTER equ $00
  1124. SERIAL_PRINTER equ   $01
  1125.  
  1126. ; BaudRate
  1127. BAUD_110 equ   $00
  1128. BAUD_300 equ   $01
  1129. BAUD_1200   equ   $02
  1130. BAUD_2400   equ   $03
  1131. BAUD_4800   equ   $04
  1132. BAUD_9600   equ   $05
  1133. BAUD_19200  equ   $06
  1134. BAUD_MIDI   equ   $07
  1135.  
  1136. ; PaperType
  1137. FANFOLD  equ   $00
  1138. SINGLE      equ   $80
  1139.  
  1140. ; PrintPitch
  1141. PICA     equ   $000
  1142. ELITE       equ   $400
  1143. FINE     equ   $800
  1144.  
  1145. ; PrintQuality
  1146. DRAFT       equ   $000
  1147. LETTER      equ   $100
  1148.  
  1149. ; PrintSpacing
  1150. SIX_LPI     equ   $000
  1151. EIGHT_LPI   equ   $200
  1152.  
  1153. ; Print Image
  1154. IMAGE_POSITIVE equ   0
  1155. IMAGE_NEGATIVE equ   1
  1156.  
  1157. ; PrintAspect
  1158. ASPECT_HORIZ   equ   0
  1159. ASPECT_VERT equ   1
  1160.  
  1161. ; PrintShade
  1162. SHADE_BW equ   $00
  1163. SHADE_GREYSCALE   equ   $01
  1164. SHADE_COLOR equ   $02
  1165.  
  1166. ; PaperSize
  1167. US_LETTER   equ   $00
  1168. US_LEGAL equ   $10
  1169. N_TRACTOR   equ   $20
  1170. W_TRACTOR   equ   $30
  1171. CUSTOM      equ   $40
  1172.  
  1173. ; PrinterType
  1174. CUSTOM_NAME equ   $00
  1175. ALPHA_P_101 equ   $01
  1176. BROTHER_15XL   equ   $02
  1177. CBM_MPS1000 equ   $03
  1178. DIAB_630 equ   $04
  1179. DIAB_ADV_D25   equ   $05
  1180. DIAB_C_150  equ   $06
  1181. EPSON    equ   $07
  1182. EPSON_JX_80 equ   $08
  1183. OKIMATE_20  equ   $09
  1184. QUME_LP_20  equ   $0A
  1185. ; new printer entries, 3 October 1985
  1186. HP_LASERJET equ   $0B
  1187. HP_LASERJET_PLUS equ $0C
  1188.  
  1189.  
  1190.  
  1191.  
  1192. ; ========================================================================
  1193. ; === Remember ===========================================================
  1194. ; ========================================================================
  1195. ; this structure is used for remembering what memory has been allocated to
  1196. ; date by a given routine, so that a premature abort or systematic exit
  1197. ; can deallocate memory cleanly, easily, and completely
  1198.  STRUCTURE Remember,0
  1199.  
  1200.     APTR rm_NextRemember
  1201.     ULONG rm_RememberSize
  1202.     APTR rm_Memory
  1203.  
  1204.  LABEL    rm_SIZEOF
  1205.  
  1206.  
  1207.  
  1208. ; ======================================================================== 
  1209. ; === Miscellaneous ====================================================== 
  1210. ; ======================================================================== 
  1211.  
  1212. ; = MACROS ============================================================== 
  1213. ;#define MENUNUM(n) (n & 0x1F)
  1214. ;#define ITEMNUM(n) ((n >> 5) & 0x003F)
  1215. ;#define SUBNUM(n) ((n >> 11) & 0x001F)
  1216. ;
  1217. ;#define SHIFTMENU(n) (n & 0x1F)
  1218. ;#define SHIFTITEM(n) ((n & 0x3F) << 5)
  1219. ;#define SHIFTSUB(n) ((n & 0x1F) << 11)
  1220. ;
  1221. ; = MENU STUFF =========================================================== 
  1222. NOMENU equ  $001F
  1223. NOITEM equ  $003F
  1224. NOSUB  equ  $001F
  1225. MENUNULL equ   $FFFF
  1226.  
  1227.  
  1228. ; = =RJ='s peculiarities ================================================= 
  1229. ;#define FOREVER for(;;)
  1230. ;#define SIGN(x) ( ((x) > 0) - ((x) < 0) )
  1231.  
  1232.  
  1233. ; these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  1234. ; I'll use a generic Width (for all resolutions) for the CheckMark.
  1235. ; If COMMSEQ, likewise I'll use this generic stuff
  1236. CHECKWIDTH  equ   19
  1237. COMMWIDTH   equ   27
  1238. LOWCHECKWIDTH  equ   13
  1239. LOWCOMMWIDTH   equ   16
  1240.  
  1241.  
  1242. ; these are the AlertNumber defines.  if you are calling DisplayAlert()
  1243. ; the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1244. ; of these patterns
  1245. ALERT_TYPE  equ   $80000000
  1246. RECOVERY_ALERT equ   $00000000   ; the system can recover from this 
  1247. DEADEND_ALERT  equ   $80000000   ; no recovery possible, this is it 
  1248.  
  1249.  
  1250. ; When you're defining IntuiText for the Positive and Negative Gadgets 
  1251. ; created by a call to AutoRequest(), these defines will get you 
  1252. ; reasonable-looking text.  The only field without a define is the IText
  1253. ; field; you decide what text goes with the Gadget
  1254. AUTOFRONTPEN   equ   0
  1255. AUTOBACKPEN equ   1
  1256. AUTODRAWMODE   equ   RP_JAM2
  1257. AUTOLEFTEDGE   equ   6
  1258. AUTOTOPEDGE equ   3
  1259. AUTOITEXTFONT  equ   0
  1260. AUTONEXTTEXT   equ   0
  1261.  
  1262.  
  1263.  
  1264.    ENDC
  1265.  
  1266.  
  1267.  
  1268.